package com.coldlz.mmp.proxy;

import java.util.ArrayList;
import java.util.List;

public class ProxyConfig {

    private int port = 18443;
    private boolean openSystemProxy = false;
    private boolean systemcProxyOpened = false;
    private Boolean directForward = false;
    private final List<Object> interceptors = new ArrayList<>(4);
    private Recorder recorder;

    public ProxyConfig() {
    }

    public Recorder getRecorder() {
        return recorder;
    }

    public void setRecorder(Recorder recorder) {
        this.recorder = recorder;
    }

    public List<Object> getInterceptors() {
        return interceptors;
    }

    public void removeInterceptor(Object interceptor) {
        interceptors.remove(interceptor);
    }

    public ProxyConfig addInterceptor(Object interceptor) {
        interceptors.add(interceptor);
        return this;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public boolean isOpenSystemProxy() {
        return openSystemProxy;
    }

    public void setOpenSystemProxy(boolean openSystemProxy) {
        this.openSystemProxy = openSystemProxy;
    }

    public boolean isSystemcProxyOpened() {
        return systemcProxyOpened;
    }

    public void setSystemcProxyOpened(boolean systemcProxyOpened) {
        this.systemcProxyOpened = systemcProxyOpened;
    }

    public boolean getDirectForward() {
        return directForward;
    }

    public void setDirectForward(boolean directForward) {
        this.directForward = directForward;
    }

    public ProxyConfig copy() {
        ProxyConfig proxyConfig = new ProxyConfig();
        return null;
    }
}
